#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include <QDate>
#include <QThread>
#include <time_thread.h>
#include <QFile>
#include <QFileDialog>
#include <QFileInfo>
#include "QSettings"
#include "QDesktopWidget"
#include <windows.h>
#pragma comment(lib,"advapi32") // 操作系统注册表必须的库函数

namespace Ui {
class Widget;
}

class Widget : public QWidget
{
    Q_OBJECT

public:
    explicit Widget(QWidget *parent = nullptr);
    ~Widget();

    //QString readlog();
    void setting_date_updata(QString setting_date,bool autu_start,bool lock_state,bool MessageBox_state,bool Change_wallpaper);
    //void writelog(QDate date_str);
    int set_year;
    int set_month;
    int set_day;

    int hour;
    bool auto_start;
    bool lock_state;
    bool MessageBox_state;
    bool Change_wallpaper;
    QString setting_date;
    QString setting_read_date;

protected:
    virtual void closeEvent(QCloseEvent* ev)override;
private:
    Ui::Widget *ui;
    MyThread *thread; //线程对象
    void mousePressEvent(QMouseEvent* event);
    void mouseMoveEvent(QMouseEvent* event);
    QPoint last_mouse_position_;

private slots:
    void timeshow(QString str);
    void on_dateEdit_userDateChanged(const QDate &date);
    void on_checkBox_stateChanged(int arg1);
    void on_checkBox_2_stateChanged(int arg1);
    void on_checkBox_3_stateChanged(int arg1);
    void on_checkBox_4_stateChanged(int arg1);
};

#endif // WIDGET_H
